// pages/more/more.js
const https = require("../../models/home")
Page({

  data: {
    result:""
  },

  onLoad: function (options) {
    // console.log(options);//{keyword: "newMusic", title: "最新音乐"}
    var {keyword,title} = options;
    // console.log(https);//{hotMusic: ƒ, newMusic: ƒ, dj: ƒ}
    // console.log(https[keyword]);//网址

    wx.setNavigationBarTitle({
      title,
    });

    var http = https[keyword];
    http().then(res=>{
      var result = res.data.playlists;
      this.setData({
        result
      })
    })
  },

  
})